package com.cloud.logger.zchain.zchainserver.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.List;

/**
 * User: wcy
 * Date: 2017/11/30
 * Time: 10:42
 */
@Data
@Document(collection="zchain_orgnation")
public class ZchainOrgnation {

    @Id
    private String id;

    @JsonProperty("org_name")
    @JSONField(name = "org_name")
    @ApiModelProperty(name = "org_name", notes = "机构名", example = "java")
    private String orgName;

    @JsonProperty("parent_id")
    @JSONField(name = "parent_id")
    @ApiModelProperty(name = "parent_id", notes = "父节点id第一层为-1", example = "-1")
    private String parentId;

    @Transient
    private List<ZchainOrgnation> children;

}
